import request from '@/utils/request'
import { GET_CHANNEL } from '../actionsTypes'
export const getChannel = (params) => {
  return async (dispatch) => {
    const res = await request({
      url: '/channels',
      method: 'GET',
      params
    })
    // console.log(res)
    dispatch({ type: GET_CHANNEL, payload: res.data.channels })
  }
}
